<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('project_config', function (Blueprint $table) {
            $table->integerIncrements('id');
            $table->string('group_code')->comment('分组代码')->nullable(false);
            $table->string('key')->comment('名称')->nullable(false);
            $table->string('value')->comment('值')->default('')->nullable(false);
            $table->string('description')->comment('描述');
            $table->unique(['key']);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('project_config');
    }
};
